package de.fhaugsburg.games.boardgames.scrabble.testing;

import de.fhaugsburg.games.boardgames.scrabble.managment.GridPoint;
import de.fhaugsburg.games.boardgames.scrabble.managment.ManhattanDirection;
import junit.framework.TestCase;

public class ManhattanDirectionTest extends TestCase {
	
	private ManhattanDirection dir1;
	private ManhattanDirection dir2;
	private GridPoint gridPointA;
	private GridPoint gridPointB;

	protected void setUp() throws Exception {
		super.setUp();
		dir1 = ManhattanDirection.DOWN;
		dir2 = ManhattanDirection.UP;
		gridPointA = new GridPoint(5,5);
		gridPointB = new GridPoint(1,5);
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}

	public void testCalcDir() {
		assertTrue(ManhattanDirection.calcDir(gridPointA, gridPointB).equals(dir2));
		
	}

	public void testNeg() {
		assertTrue(ManhattanDirection.neg(dir1).equals(dir2));
	}

}
